diff --git a/src/activeqt/container/qaxbase.cpp b/src/activeqt/container/qaxbase.cpp
index aa66398..5024e28 100644
--- a/src/activeqt/container/qaxbase.cpp
+++ b/src/activeqt/container/qaxbase.cpp
@@ -93,6 +93,7 @@ static inline HRESULT Invoke(IDispatch *disp,
                              EXCEPINFO *pExcepInfo,
                              unsigned int *puArgErr)
 {
+    qDebug() << __FUNCTION__ ;
     if ((wFlags & DISPATCH_PROPERTYPUT) &&
         pDispParams &&
         pDispParams->cArgs == 1 &&
@@ -1646,6 +1647,7 @@ private:
     QMap<QByteArray, Method> slot_list;
     inline void addSlot(const QByteArray &type, const QByteArray &prototype, const QByteArray &parameters, int flags = QMetaMethod::Public)
     {
+        qDebug() << __FUNCTION__ << "prototype=" << prototype << parameters;
         QByteArray proto = replacePrototype(prototype);
 
         Method &slot = slot_list[proto];
@@ -2301,7 +2303,7 @@ void MetaObjectGenerator::readEnumInfo()
             } else {
                 enumName = "enum" + QByteArray::number(++enum_serial);
             }
-
+            QByteArrayList vs;
             // Get the attributes of the enum type
             TYPEATTR *typeattr = 0;
             enuminfo->GetTypeAttr(&typeattr);
@@ -2322,10 +2324,12 @@ void MetaObjectGenerator::readEnumInfo()
 
                         clashCheck.insert(QString::fromLatin1(valueName));
                         addEnumValue(enumName, valueName, value);
+                        vs.append(valueName);
                     }
                     enuminfo->ReleaseVarDesc(vardesc);
                 }
             }
+            qDebug() << __FUNCTION__ << "enumName=" << enumName << vs;
             enuminfo->ReleaseTypeAttr(typeattr);
             enuminfo->Release();
         }
@@ -3478,6 +3482,7 @@ int QAxBase::internalProperty(QMetaObject::Call call, int index, void **v)
     const QMetaObject *mo = metaObject();
     const QMetaProperty prop = mo->property(index + mo->propertyOffset());
     QByteArray propname = prop.name();
+    qDebug() << __FUNCTION__ << propname << call;
 
     // hardcoded control property
     if (propname == "control") {
@@ -3603,6 +3608,7 @@ int QAxBase::internalInvoke(QMetaObject::Call call, int index, void **v)
     Q_ASSERT(slot.methodType() == QMetaMethod::Slot);
 
     QByteArray signature(slot.methodSignature());
+    qDebug() << __FUNCTION__ << signature;
     QByteArray slotname(signature);
     slotname.truncate(slotname.indexOf('('));
 
@@ -3667,7 +3673,9 @@ int QAxBase::internalInvoke(QMetaObject::Call call, int index, void **v)
             }
         }
 
-        QVariantToVARIANT(qvar, params.rgvarg[int(params.cArgs) - p - 1], type, out);
+        int idx = int(params.cArgs) - p - 1;
+        QVariantToVARIANT(qvar, params.rgvarg[idx], type, out);
+        qDebug() << __FUNCTION__ << "p=" <<p << params.rgvarg[idx].vt;
     }
 
     // call the method
@@ -3802,6 +3810,7 @@ static void qax_noSuchFunction(int disptype, const QByteArray &name, const QByte
 bool QAxBase::dynamicCallHelper(const char *name, void *inout, QList<QVariant> &vars,
                                 QByteArray &type, unsigned flags)
 {
+    qDebug() << __FUNCTION__ << name;
     if (isNull()) {
         qWarning("QAxBase::dynamicCallHelper: Object is not initialized, or initialization failed");
         return false;
@@ -3947,6 +3956,7 @@ bool QAxBase::dynamicCallHelper(const char *name, void *inout, QList<QVariant> &
     if (varc) {
         varc = qMin(varc, d->metaobj->numParameter(normFunction));
         arg = varc <= QAX_NUM_PARAMS ? staticarg : new VARIANT[varc];
+        qDebug() << __FUNCTION__ << "looping varc=" << varc;
         for (int i = 0; i < varc; ++i) {
             QVariant var(vars.at(i));
             VariantInit(arg + (varc - i - 1));
@@ -3959,16 +3969,22 @@ bool QAxBase::dynamicCallHelper(const char *name, void *inout, QList<QVariant> &
             else
                 paramType = d->metaobj->paramType(normFunction, i, &out);
 
+            const int idx = varc - i - 1;
             if ((!parse && d->useMetaObject && var.type() == QVariant::String) || var.type() == QVariant::ByteArray) {
                 int enumIndex =mo->indexOfEnumerator(paramType);
                 if (enumIndex != -1) {
                     QMetaEnum metaEnum =mo->enumerator(enumIndex);
-                    QVariantToVARIANT(metaEnum.keyToValue(var.toByteArray()), arg[varc - i - 1], "int", out);
+                    const int kv = metaEnum.keyToValue(var.toByteArray());
+                    QVariantToVARIANT(kv, arg[idx], "int", out);
+                    qDebug() << __FUNCTION__ << "Enum / i=" << i << var.toByteArray() << "vt=" << arg[idx].vt << "keyToVal=" << kv;
                 }
             }
 
-            if (arg[varc - i - 1].vt == VT_EMPTY)
-                QVariantToVARIANT(var, arg[varc - i - 1], paramType, out);
+
+            if (arg[idx].vt == VT_EMPTY) {
+                QVariantToVARIANT(var, arg[idx], paramType, out);
+                qDebug() << __FUNCTION__ << "i=" << i << var << "vt=" << arg[idx].vt;
+            }
         }
     }
 
