Fix #22 energy loop

This should fix the energy loop between capacitors. I am submitting a PR because this could possibly be dangerous. 
@LordFokas, would you be kind enough to look this over?