event triggering bug fix