client now properly receives messages from server