fixed bug in testing suite, and broken test cases