Fix the signed vs. unsigned comparison