Fix comparisons between signed and unsigned integer.