fixed test cases for the changes. Added a new test case to cover the failure.