Fix bug with unsigned ints