fixing problems relating to test cases