term deletion bug fix