Fixing db syncing