fix check_packages