Repaired several UINT macros to cast to unsigned instead of signed int.