fixed some issues with migrations