Fixed a bug and added sync fields to all dbs