fixed search truncation bug when sort is applied