fix some const correctness