fixes in client and server