Improved the logical plan.