[v0.15] Server: Fix infinite loop.
[v0.15] Client/Server: Fix some bugs.