Fixed check for config variables