Fix issue with clean function