added test case to verify presence of bug
fixed it