fixed __search_pkg()