Fix major bug when getting event handlers