Fixed -1 bug in getFuncMaxed.R in getMaxValue (as -1, now is +1)