Duplicate event bug fix