Fix AttributeError introduced in a9ef14a