fix error in reading plan.