max min svec1 not working