Bug in WebSocket client, should return Promise instead of Deferred