fix clearing events