[*] fix some bugs in terms