fix const correctness