Bug fix in Sync.py