Bug fixed, Testcases added