  /// @brief broadcasts an event
  ////////////////////////////////////////////////////////////////////////////////
  
-diff --git a/lib/BasicsC/memory.c b/lib/BasicsC/memory.c
-index 71b4d69..12b53a6 100644
---- a/lib/BasicsC/memory.c
-+++ b/lib/BasicsC/memory.c
-@@ -181,6 +181,7 @@ void* TRI_Allocate (TRI_memory_zone_t* zone, uint64_t n, bool set) {
- 
-   if (m == NULL) {
-     if (zone->_failable) {
-+      LOG_TRACE("malloc returned 0");
-       return NULL;
-     }
- 

 
   if (tryCatch.HasCaught()) {
     if (tryCatch.Exception()->IsObject() && v8::Handle<v8::Array>::Cast(tryCatch.Exception())->HasOwnProperty(v8::String::New("errorNum"))) {
@@ -1798,6 +1910,8 @@ static v8::Handle<v8::Value> JS_RunAhuacatl (v8::Arguments const& argv) {
     return scope.Close(v8::ThrowException(errorObject));
   }
 
+  LOGGER_DEBUG << "returning cursor result";
+
   return scope.Close(result);
 }
 
@@ -1834,8 +1948,8 @@ static v8::Handle<v8::Value> JS_ExplainAhuacatl (v8::Arguments const& argv) {
   // bind parameters
   triagens::rest::JsonContainer parameters(TRI_UNKNOWN_MEM_ZONE, argc > 1 ? TRI_JsonObject(argv[1]) : 0);
 

   // loop until there's nothing to delete or 
   // we have deleted SHADOW_MAX_DELETE elements 
   while (deleteCount++ < SHADOW_MAX_DELETE || force) {
@@ -540,8 +552,13 @@ void TRI_CleanupShadowData (TRI_shadow_store_t* const store,
       if (shadow->_rc < 1 || force) {
         if (shadow->_type == SHADOW_TRANSIENT || 
             shadow->_timestamp < compareStamp || 
+            shadow->_deleted ||
             force) {
-          LOG_TRACE("cleaning expired shadow %p", shadow);
+          LOG_TRACE("cleaning shadow %p, rc: %d, expired: %d, deleted: %d", 
