More migration template fixes