fix case when packages_cache is empty