Fix #125 WebSocket connection error on unload