fix search hit template (avoid undefined)