Fix replanning