Fixed search to properly check for resource items