Added check for location service.