Correct bad unit flags in script (cherry picked from commit e7ba33b047267ea63932cc9c1cabb1048a9420c9)