Fixes for Issue #37 and Issue #38