improved ast const correctness