close events if they are not needed anymore