Clearing tasks in a different way so that it doesn't flicker.