Fix websocket and datasource problems

The previous changes broke the websocket and datasource bindings.
This change fixes those problems.
Merge branch 'web-socket'