Fixed memory leak in test fixture