fixed the sync script