Fixing promise rejection from `data.sync()`