add regression test for issue 1876