Fix tmigrate script