Fixes to data migrate