Fixes #82 and #85