         presentedMessages = messages
 
         let binder = MessageBinder(messages: messages, dateFormatter: dateFormatter)
-        scene.bindMessages(count: messages.count, with: binder)
+        scene?.bindMessages(count: messages.count, with: binder)
 
         if messages.isEmpty {
-            scene.hideMessagesList()
-            scene.showNoMessagesPlaceholder()
+            scene?.hideMessagesList()
+            scene?.showNoMessagesPlaceholder()
         } else {
-            scene.showMessagesList()
-            scene.hideNoMessagesPlaceholder()
+            scene?.showMessagesList()
+            scene?.hideNoMessagesPlaceholder()
         }
     }
 

    }

    func privateMessagesServiceDidFinishRefreshingMessages(messages: [Message]) {
        scene.hideRefreshIndicator()
        presentMessages(messages)
    }

    func privateMessagesServiceDidFailToLoadMessages() {
        scene.hideRefreshIndicator()
    }

    // MARK: Private

    }

    func messagesSceneDidTapLogoutButton() {
        delegate.showLogoutAlert { [weak self] (dismissAlert) in
            self?.authenticationService.logout { (result) in
                dismissAlert()

                switch result {
                case .success:
                    self?.delegate.messagesModuleDidRequestDismissal()

                case .failure:
                    self?.delegate.showLogoutFailedAlert()
                }
            }
        }
