Fixes #94 and #99.