Sync takes connectivity into account. Closes #157