getTerm: fix a bug