Fixes #66 and fixes #65