fix NullPointerException in WebSocketClient