Fix reg issues

Order matters. You don't set it before using it.