A* working wrong