Fix length arithmetic.