Fixed bug causing WS not to respond after reconnect