add two regression tests for #1011