Fix AttributeError.