Added so the planner doesnt visit the same state more than once