Fixed config check code