bugfix in the gate evaluate_value_lambda