fix setavgmax. value from hget is now converted to a number before comparisons