Fix communicating with server