             handle(deletions: deletions, on: messagesQuery)
             handle(insertions: insertions, on: messagesQuery)
             handle(modifications: modifications, on: messagesQuery)
-
-            cacheDataSorted()
-            onDataChanged?()
-
+            updateData()
         case .error(let error):
             fatalError("\(error)")
         }

        }

        if messagesFromDatabase.count > 0 {
            cacheDataSorted()
            onDataChanged?()
        }

        requestingData = true

    }

    /**
     This method is called on every update the messagesQuery get from Realm.
    */
    internal func handleDataUpdates(changes: RealmCollectionChange<Results<Message>>) {
