Fixes for #88 and #72