making if condition consistant as per PR #247
Merge pull request #248 from patprzybilla/master

making if condition consistant as per PR #247