diff --git a/goffice/utils/go-style.c b/goffice/utils/go-style.c
index 8bbe866..7c8084a 100644
--- a/goffice/utils/go-style.c
+++ b/goffice/utils/go-style.c
@@ -1403,14 +1403,13 @@ go_style_line_sax_save (GsfXMLOut *output, char const *name,
 {
 	gsf_xml_out_start_element (output, name);
 
-	gsf_xml_out_add_bool (output, "auto-dash", line->auto_dash);
 	if (!line->auto_dash)
 		gsf_xml_out_add_cstr_unchecked (output, "dash",
 						go_line_dash_as_str (line->dash_type));
 
-	gsf_xml_out_add_float (output, "width", line->width, 6);
+	if (!line->auto_width)
+		gsf_xml_out_add_float (output, "width", line->width, 6);
 
-	gsf_xml_out_add_bool (output, "auto-color", line->auto_color);
 	if (!line->auto_color)
 		go_xml_out_add_color (output, "color", line->color);
 
@@ -1537,11 +1536,13 @@ go_style_sax_load_line (GsfXMLIn *xin, xmlChar const **attrs)
 {
 	GOStyle *style = GO_STYLE (xin->user_state);
 	GOStyleLine *line = &style->line;
+	gboolean auto_dash = FALSE, auto_color = FALSE; /* we don't need auto_width since we never saved it */
 
 	for (; attrs != NULL && attrs[0] && attrs[1] ; attrs += 2)
-		if (0 == strcmp (attrs[0], "dash"))
+		if (0 == strcmp (attrs[0], "dash")) {
 			line->dash_type = go_line_dash_from_str (attrs[1]);
-		else if (bool_sax_prop ("auto-dash", attrs[0], attrs[1], &line->auto_dash))
+			line->auto_dash = FALSE;
+		} else if (bool_sax_prop ("auto-dash", attrs[0], attrs[1], &auto_dash))
 			;
 		else if (0 == strcmp (attrs[0], "width")) {
 			line->width = g_strtod (attrs[1], NULL);
@@ -1551,10 +1552,18 @@ go_style_sax_load_line (GsfXMLIn *xin, xmlChar const **attrs)
 				line->width = 0.;
 				line->dash_type = GO_LINE_NONE;
 			}
-		} else if (0 == strcmp (attrs[0], "color"))
+			line->auto_width = FALSE; /* this might be wrong but we never saved that field */
+		} else if (0 == strcmp (attrs[0], "color")) {
 			go_color_from_str (attrs[1], &line->color);
-		else if (bool_sax_prop ("auto-color", attrs[0], attrs[1], &line->auto_color))
+			line->auto_color = FALSE;
+		}
+		else if (bool_sax_prop ("auto-color", attrs[0], attrs[1], &auto_color))
 			;
+	/* now we must set auto fields retrieved from old files */
+	if (auto_dash)
+		line->auto_dash = TRUE;
+	if (auto_color)
+		line->auto_color = TRUE;
 }
 
 static void
