Patches to fix indefinite sync issue.