Fixed compiler warning about comparison between signed/unsigned.