Fix for issue #4 (broken if-then-else)

Pretty simple fix. Included @gitblit's unit test.