Fixing promise rejection from `data.sync()`

Minor change