Fixed issues with the use of the SetUnitName function