fix traction direction error and another potential bug