some fixes for websocket