Fix #167: check if provider is available.