fix a typo in events.js