A fix for the DB synchronization after a restart