diff --git a/Python/waveform.py b/Python/waveform.py
index 6fcb58b071a7348bcdd55f56e6b25afdebe3db94..b93c104a40b60172da9bc5b1440f4fe5b4951b7a 100644
--- a/Python/waveform.py
+++ b/Python/waveform.py
@@ -37,12 +37,12 @@ class Waveform:
         if np.sum(amps) >= 2**15 - 1:
             print("warning: amplitudes too high")
             return False
-        self.amplitude = amps[:len(amplitude)]
+        self.amplitude = amps[:len(self.amplitude)]
         return True
 
 
     def set_phase(self, phase: np.ndarray) -> bool:
-        self.phi = phase
+        self.phi = phase[:len(self.phi)]
         return True