fix migrate bug