fixed error when searching