Fix #78 and add an server error websocket event