Fixed guard fn for cjs.on events