fix: scope of the eventhandler