Properly sync databases