added test cases for this bug