bugfix in packets handler
Merge branch 'message_handler_code_organizing'