fix Closure using wrong variable because typo