Fixes #1170 - PIN issues during upgrade

Fixes #1170