fixed semantic bug