[fix] Fix emitted events, no longer undefined.