Fixes for server and client