diff --git a/lib/elements/element.py b/lib/elements/element.py
index 8884bc2aa..5d0f8c0dd 100644
--- a/lib/elements/element.py
+++ b/lib/elements/element.py
@@ -563,7 +563,7 @@ class EmbroideryElement(object):
         if hasattr(self, 'gradient') and self.gradient is not None:
             gradient['stops'] = self.gradient.stop_offsets
             gradient['orientation'] = [self.gradient.x1(), self.gradient.x2(), self.gradient.y1(), self.gradient.y2()]
-            gradient['styles'] = [(style['stop-color'], style['stop-opacity']) for style in self.gradient.stop_styles]
+            gradient['styles'] = [(stop.style('stop-color'), stop.style('stop-opacity')) for stop in self.gradient.stops]
         return gradient
 
     def _get_tartan_key_data(self):