Fixes #37 and #38