bug fix in plan generation