fix delayed websocket connection