Correct condition branches, should fix #14

[ci skip]