Fixed issue in sync where both conditions were firing on the check of jsonOrCb