Fixed if statement logic.
Merge pull request #313 from jawallace/redundant

Fixed if statement logic.