fix generalized lambda captures issue