Remove unused variable within closure