Fixed migration script (#226)