Fix duplicate event triggering