Issue #38

some more fixes on issue #38