Fix AI getting stuck due to reusing old path