Fixing #13, if statement the wrong way round

(As I expected, this will fix the bug)