fix listeners so that events call the correct listener