Fix and change some upgrades. Fixes #1, #2.