--- a/incubator/ooSQLite/src/ooSQLite.cpp
+++ b/incubator/ooSQLite/src/ooSQLite.cpp
@@ -8466,7 +8466,7 @@
 
     if ( doCallback )
     {
-        if ( argumentExists(3) )
+        if ( argumentExists(4) )
         {
             if ( format < anArrayOfArrays || format > aStemOfStems )
             {
@@ -8486,7 +8486,7 @@
 
         cbc.callbackContext = context->threadContext;
 
-        if ( argumentExists(4) )
+        if ( argumentExists(5) )
         {
             cbc.callbackRtn = getCallerRoutine(context, rtnName);
             if ( cbc.callbackRtn == NULLOBJECT )