only run cleanup if the class provides it