fix private var and lambda bug