fixed some stuff with server and client