The WebSocket is sending garbled data to the server. Tried to fix that using exception catching mechanism.