fix a bug and add a test
1.1.1