Added synchronized keyword for client methods communicating with server, just to be sure.