bug fix: ws.onopen should have been @ws.onopen