Even more leaks fixed in the test cases...