Fixed double-free problem.