added missing cleanup on testbench function