fix lambda captures