Fixed issue where the clean would not always be executed