fix type mismatch error in _get_chopped_variant