Use unsigned int to fix compiler warning