Fixes #1170 - PIN issues during upgrade

#1170