bugfix on websocket close