Fixed bug in computeKineticEnergy()