This needs to be in an if block in case the setting does not exist. I think this is what is causing the test failures on jenkins.