fixes lambda scopes