Fixing WebSocket issues