did some more fixes to Issue #31