Fix double-event problem