Fix leaked key in test