fix some term function