Fixed logic error on when nothing should be avoided