Fix const correctness issues.