Bugfix for wrong arguments to event callback