Fix upgrade from roxy

Copying straight from the template is nice, but can break when migrating
from a long time ago and then renaming a key.
Merge pull request #208 from vuntz/fix-upgrade-roxy

Fix upgrade from roxy