fix comparisons betwenn signed and unsigned integers