Fixed many issues with the client/seerver interaction