Quick events.js bug fix