Added test cases for bug.