Working fix for unsigned int conversions