shorten: use the unsigned type where needed