Fixes #80 and #81