Fix partial tasks cleanup