fix buildAttributes() 2