Fix error in cleanup