Fixed issue with incomplete clean operation that cased problems when upgrading