fixed A* caching