fix buildAttributes