Minor changes for migration
fixed bugs