fixed bug in force calculation