Fixed pretty much everything related to server->client synchronization

@asiekierka, what have you done.