fixing small but major bug for AStar: getMinWeight had a different unit as getWeight