Fixes Issue #38 and #39