fix const checking