Fixed closure capture problem.