added an additional check to ensure uri and license are available before setting the variables