fixed issue #29: bad if test?