Fixed bugs of LogicalOptimizer2.