Fix comparison between signed and unsigned integer warnings