fixed bugs in plan improvement