fixed bugs with energy kinetic conservation