Fix two cleanup bugs making the tests fail