added a test case for a bug and make it pass