correction of astar and matrix