Fix AttributeError in get_largest.