Fix crash where attrs is not defined.