fixes for issue #38