fixes #1  with regression test