eliminate some 'comparison between signed and unsigned integer expressions' warnings