Fix bug when syncing against default db