Add progress bar for packages installation.
Fix some border cases.