Fix "comparison between signed and unsigned integer" warning