fixed problem with search result wrapping.