websocket responses contain nested data in message, fixed code