Worked off some bugs in chat server