fixed comparisions of signed and unsigned for C