         if didAddNewMessageInLastUpdate {
             didAddNewMessageInLastUpdate = false
             handleNewMessage()
-        }
-
-        // workaround for deadlock in objcTox https://github.com/Antidote-for-Tox/objcTox/issues/51
-        let delayTime = dispatch_time(DISPATCH_TIME_NOW, Int64(0.0 * Double(NSEC_PER_SEC)))
-        dispatch_after(delayTime, dispatch_get_main_queue()) { [weak self] in
-            self?.updateLastReadDate()
+
+            if UIApplication.isActive {
+                // workaround for deadlock in objcTox https://github.com/Antidote-for-Tox/objcTox/issues/51
+                let delayTime = dispatch_time(DISPATCH_TIME_NOW, Int64(0.0 * Double(NSEC_PER_SEC)))
+                dispatch_after(delayTime, dispatch_get_main_queue()) { [weak self] in
+                    self?.updateLastReadDate()
+                }
+            }
         }
     }
 


        edgesForExtendedLayout = .None
        hidesBottomBarWhenPushed = true
    }

    required convenience init?(coder aDecoder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }

    override func loadView() {

    }
}

// MARK: Notifications
extension ChatPrivateController {
    func applicationDidBecomeActive() {
        self.updateLastReadDate()
    }
}

extension ChatPrivateController: UITableViewDataSource {
    func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell {
        let message = dataSource.objectAtIndexPath(indexPath) as! OCTMessageAbstract
