Fix issue with highlighting function when query is empty