Improved package restore.