Added explicit casting from unsigned long to unsigned int.