Revert migrate.c from 3.0.39 patch.