Bug fix and changes for new installation of wspgrade