fix getPagesByTerm