% bug fixed for term search