bug fix in test cases as per Johns comments