Fix build_attributes return values