Misc fixes #88 and #83