fixed undefined errors with event listeners
Merge pull request #58 from sgray11/event_listeners

fixed undefined errors with event listeners