Logic corrections in Websocket part