bug fixes for joints.