Added checks so sync doesn't lookup ref_id if 0, should help with sync with reference to object in module that isn't enabled