Implemented automatic periodic sync.