signed vs. unsigned int comparison fix