fixed registration when app is reinstalled