fix bug for empty query in highligh function