added crcsync changes from ccan