removed debug statement; fixed websocket close function assignment bug