Add failed test for #7 and fix it