fix: captured variable must be declared to local.