another small bugfix in event listener