Fixes for #207 and #209