a bug in the making: add regression test