Fix a crash bug when sync data before login.