BUG: Fixed introduced bug in the cleaning