Modify tests, correct errors