Fix minor migration bugs