Fix to preserve nextSearchTerm functionality