Fix some mixups in migration