fixed bug when integrating external forces