Fix class wrapper for clean function