fixed #25

multi-line if statement needed brackets