Fixes #1170 - PIN issues during upgrade