fix reconnect issue with web socket