Fixed a bug preventing A* API from working