Fix energy computation and display