Fix for problems with migrations