More improvements to key-value sync.