Fixed g++ warning about comparisons