fix bug migrate