Get Astar working correctly