fix anlysis failure logic