Code changes for some new test cases