Fixes for #207 and #209

also updated some test scenarios