fix migration problems