fixing errors on client side and fixing client/server communications