fix const correctness problems in arith