fix only_if in provider