Fixed g++ warning about comparison between signed and unsigned int