change prepare to clone_structure after migrate
  because prepare fails when there is undone migration