Issue #142 fixes - requires testing.