removed config vars from if block