fix bug in astar