Hopefully fixed add_attribute for #2