fix duplicate event issue