improve the auto synchronization of db