Fixxed a couple of bugs in the client and in the server.

Everything should work fine now :3