Fixed null pointer when Syncing