Fixed an error in websocket connection