Fixed some errors with unsigned ints