Fixed NullPointerException in Server related to receiving messages