Websocket Disconnect Bugs

Fixes bug with firefox not sending disconnect message