  // --SECTION--                                                  HELPER FUNCTIONS
  // -----------------------------------------------------------------------------
  
-@@ -1006,6 +1072,7 @@ static v8::Handle<v8::Value> ExecuteQueryNativeAhuacatl (TRI_aql_context_t* cons
+@@ -513,7 +579,9 @@ static v8::Handle<v8::Value> DocumentVocbaseCol (TRI_vocbase_t* vocbase,
+   // inside a read transaction
+   // .............................................................................
+ 
++  LOG_TRACE("before beginRead");
+   collection->_collection->beginRead(collection->_collection);
++  LOG_TRACE("after beginRead");
+ 
+   document = collection->_collection->read(collection->_collection, did);
+ 
+@@ -524,7 +592,9 @@ static v8::Handle<v8::Value> DocumentVocbaseCol (TRI_vocbase_t* vocbase,
+     result = TRI_WrapShapedJson(collection, &document, barrier);
+   }
+ 
++  LOG_TRACE("before endRead");
+   collection->_collection->endRead(collection->_collection);
++  LOG_TRACE("after beginRead");
+ 
+   // .............................................................................
+   // outside a write transaction
+@@ -610,7 +680,9 @@ static v8::Handle<v8::Value> ReplaceVocbaseCol (TRI_vocbase_t* vocbase,
+   // inside a write transaction
+   // .............................................................................
+ 
++  LOG_TRACE("before beginWrite");
+   collection->_collection->beginWrite(collection->_collection);
++  LOG_TRACE("after beginWrite");
+ 
+   TRI_voc_rid_t oldRid = 0;
+   TRI_doc_mptr_t mptr = doc->update(doc, shaped, did, rid, &oldRid, policy, true);
+@@ -1006,6 +1078,7 @@ static v8::Handle<v8::Value> ExecuteQueryNativeAhuacatl (TRI_aql_context_t* cons
                                                           const TRI_json_t* const parameters) {
    v8::HandleScope scope;
  

     v8::Handle<v8::Object> errorObject = TRI_CreateErrorObject(TRI_ERROR_OUT_OF_MEMORY, "out of memory");
 
     return scope.Close(v8::ThrowException(errorObject));
@@ -1091,6 +1172,7 @@ static v8::Handle<v8::Value> ExecuteQueryCursorAhuacatl (TRI_vocbase_t* const vo
   assert(cursor);
   TRI_StoreShadowData(vocbase->_cursors, (const void* const) cursor);
 

 }
 
 ////////////////////////////////////////////////////////////////////////////////
@@ -1365,7 +1451,7 @@ static v8::Handle<v8::Value> JS_CountGeneralCursor (v8::Arguments const& argv) {
   cursor = (TRI_general_cursor_t*) TRI_BeginUsageDataShadowData(vocbase->_cursors, UnwrapGeneralCursor(argv.Holder()));
 
   if (cursor) {
