Client/server fixes for websockets