Correct SyncTask Work
Switch loop to foreach
Merge branch 'fix-sync-service'