Fix WebSocket synchronization issue.