Small fix

check the correct entity in the event.
Merge pull request #4 from daggs/master

Small fix