Better db syncing