Fix non-matching signed and unsigned ints