Fixes #87 and #88