Combined two similar ifs to one with xor
Merge pull request #96 from nikibobi/patch-1

Combined two similar ifs to one with xor