moved event triggering before callback call