Some fixes for install_packages