fix migrate template