a few more fixes for issue #135