Fixing const correctness