fixed duplicate event bug