Fixed task deletion