Fixed unsigned to signed int comparisons