diff --git a/functions.py b/functions.py
index 196680bc80356237158fcd3a20467e27e1a9697e..5be93b796f33a5b9d7b1bb855eec98da45c93574 100644
--- a/functions.py
+++ b/functions.py
@@ -91,8 +91,8 @@ class Mul(_Function):
         # TODO: Implement the derivative dx for this opetation and add the
         # result of the chain rule on self.dx.
         #######################################################################
-        self.dx = grad * self.y
-        self.dy = grad * self.x
+        self.dx = grad * self.y.data
+        self.dy = grad * self.x.data
         #######################################################################
         # --------------------------- END OF YOUR CODE ------------------------
         #######################################################################