Merge pull request #606 from hhovsepy/sam-1.3

added more checks for upgrade scenarios
added more upgrade scenarios