Improve identity migration