Fix websocket handling