fixed plan generation error