fixed compiler warning about comparison between int and uint