Fixed setupFlow and key storage