fix the bug in const-pos