fixed crash when location provider is not available