Fixed: trying to get non-object property when search is false