Fixed closure issue