Fix signed/unsigned mismatches.