Few more tests added and a bug fix