issue #34 fix, other minor fixes