fix migration errors