Replaced use of redudant logic.