More fixes for cleaning tasks