added some value protection to the graphs, and fixed a memory leak that was happening only on computers with no battery... no wonder I never caught it on my laptop