Modified the code to look at the config directly.