Improve handling websockets [#2]