added debug logging to websocket
fix handling empty presentation in some cases