fixed issue in cast of migration