fixed bug with client server communication