bugfixes in clean and distclean logic