Quick fix

Used two if statements, both of which just broke a loop. Just threw them together with ||. Should be slightly faster.
Merge pull request #17 from SHTheSuper/master

Small optimization.