fix race with window close detection and redeem code fetching