WebSocketModule: Fixed some bugs and added a TODO.