caught bugs in server and client