Remove unnecessary var use in closure