Merge "Fix NPE during migration."