Adding a test and a fix