Fix WebSocket bug with Firefox