fix undefined errors
Merge pull request #2 from minsh/event-not-found

fix undefined errors