fixed issue that was not calling the planner ocassionally - and also added logic for the planner to be called immediately when the controller gives an error