Fixed some signed vs unsigned int comparisons.