fix wrong use of jointId