Variable check added in setUrl