Don't use "else" here - if you do, then we won't do two sequential upgrades.  It'll do the first one (version 1 to version 2) then it'll skip the version 2 to version 3 upgrade.