fix astar bugs