Fixed a compiler warning: unsigned int comparison is always true