fixed bug with migrations