Fixed NullPointerException with unprocessed messages.