fix if loops
Merge pull request #9 from zacksheppard/master

fix if loops