confused about semantic bug