fixed error @ search function