bug fix and update migrate file