Added missing cast (division of an unsigned by a signed is unsigned)