fix memory leak for container item