minor memory leak fix