fixed a const correctness issue