fixed several test failures; currently 9 out of 73 tests fail