Fixing bug on max input vars handling