server and client now work correctly