Fix sync flow