fix a couple of implicit signed/unsigned conversions
const as const can