Fixed searching result returning data out of range