bugfix: fixes infinite energies due to wrong initialization