Fixes for #100 and #102