Implemented a test to catch a bug