bug fix for negative numbers

http://openenergymonitor.org/emon/node/3991