Fix signed/unsigned comparisons