releasing joints when trajectory is quit