anchor.diff:                 IDOFOld = m%NodesDOF(iNode)%List(1:6)
               endif
            else
  -            ErrMsg2='Wrong joint type'; ErrStat2=ErrID_Fatal
  +            allocate(IDOFOld(1:len(m%NodesDOF(iNode))))
  +            IDOFOld(:) = m%NodesDOF(iNode)%List(:)
  +            phat = Init%Nodes(iNode, iJointDir:iJointDir+2)
  +            call JointElimination(Init%NodesConnE(iNode,:), JType, phat, Tc, Init, p, ErrStat2, ErrMsg2)
            endif
            if (allocated(Tc)) then
               nc=size(Tc,2) 
               call init_list(m%NodesDOFtilde(iNode), nc, 0, ErrStat2, ErrMsg2)
               m%NodesDOFtilde(iNode)%List(1:nc) = (/ (iprev + i, i=1,nc) /)
               IDOFNew => m%NodesDOFtilde(iNode)%List(1:nc) ! alias to shorten notations
  -            !print*,'N',iNode,'I ',IDOFOld
  -            !print*,'N',iNode,'It',IDOFNew
  +            print*,'N',iNode,'I ',IDOFOld
  +            print*,'N',iNode,'It',IDOFNew
               Tred(IDOFOld, IDOFNew) = Tc
               iPrev = iPrev + nc
            else
  
positive.code:    iPrev =0
     do iNode = 1, Init%NNode
        ! --- Distribute to joints iPrev + 1:6, or, iPrev + 1:(3+3m)
        if (Init%Nodes(iNode,iJointType) == idJointCantilever ) then
           nRot=3
        else
           nRot= 3*Init%NodesConnE(iNode,1) ! Col1: number of elements connected to this joint
  
negative.code:          endif
        enddo
     else
        ! Safety check does not apply if some joints are non-cantilever
     endif
  
  CONTAINS
  