More fixes for migrations