anchor.diff:        return
      end if
   
  -
      ! --- Eigenvalue analysis
  -   CALL AllocAry(Omega2_FEKi , N,    'Omega',   ErrStat2, ErrMsg2); if(Failed()) return;
      CALL AllocAry(EigVect_FEKi, N, N, 'EigVect', ErrStat2, ErrMsg2); if(Failed()) return;
  -   CALL EigenSolve(K_FEKi, M_FEKi, N, bCheckSingularity, EigVect_FEKi, Omega2_FEKi, ErrStat2, ErrMsg2 ); if (Failed()) return;
  +   CALL EigenSolve(K_FEKi, M_FEKi, N, bCheckSingularity, EigVect_FEKi, Omega, ErrStat2, ErrMsg2 ); if (Failed()) return;
   
      ! --- Setting up Phi, and type conversion
  -   do i = 1, NOmega
  -      if (abs(Omega2_FEKi(i))>huge(1.0_ReKi)) then
  -         Om2 = huge(1.0_ReKi) * sign(1.0_FEKi, Omega2_FEKi(i))
  -      else
  -         Om2 = real(Omega2_FEKi(i), FEKi)  
  -      endif
  -      if (EqualRealNos(Om2, 0.0_FEKi)) then  ! NOTE: may be necessary for some corner numerics
  -         Omega(i)=0.0_FEKi
  -         if (bCheckSingularity) then
  -            ErrStat2=ErrID_Fatal
  -            ErrMsg2= 'Zero eigenvalue found, system may be singular (may contain rigid body modes)'
  -            if(Failed()) return
  -         endif
  -      elseif (Om2>0) then 
  -         Omega(i)=sqrt(Om2) ! was getting floating invalid
  -      else
  -         ! Negative eigenfrequency
  -         print*,'>>> Wrong eigenfrequency, Omega^2=',Om2
  -         Omega(i)= 0.0_FEKi 
  -         if (bCheckSingularity) then
  -            ErrStat2=ErrID_Fatal
  -            ErrMsg2= 'Negative eigenvalue found, system may be singular (may contain rigid body modes)'
  -            if(Failed()) return
  -         endif
  -      endif
  -   enddo
      if (present(bDOF)) then
         ! Insert 0s where bDOF was false
         CALL InsertDOFRows(EigVect_FEKi(:,1:nOmega), bDOF, 0.0_FEKi, EigVect, ErrStat2, ErrMsg2 ); if(Failed()) return
  
positive.code:    REAL(FEKi),              INTENT(INOUT)    :: M(N, N)       !< Mass matrix 
     LOGICAL,                 INTENT(IN   )    :: bCheckSingularity                  ! If True, the solver will fail if rigid modes are present 
     REAL(FEKi),              INTENT(INOUT)    :: EigVect(N, N) !< Returned Eigenvectors
     REAL(FEKi),              INTENT(INOUT)    :: Omega2(N)      !< Returned Eigenvalues
     INTEGER(IntKi),          INTENT(  OUT)    :: ErrStat       !< Error status of the operation
     CHARACTER(*),            INTENT(  OUT)    :: ErrMsg        !< Error message if ErrStat /= ErrID_None
     ! LOCALS         
  
negative.code:             Omega2(I) = HUGE(1.0_FEKi)
           endif
        endif
     enddo  
     ! Sorting
     CALL ScaLAPACK_LASRT('I',N,Omega2,KEY,ErrStat2,ErrMsg2); if(Failed()) return 
  