Fixed a naughty bug in AStar