fix for updating value and max to zero
Merge pull request #11 from rikkertkoppes/master

fix for updating value and max to zero