Fix #9


The first commit creates a test that fails because of #9, the second fixes the issue.