Fixes #64 and #108