Fix error with generate and delete clone