diff --git a/pyfstat.py b/pyfstat.py
index 6865429b56b004d8c10d23df4203e24fc39f36ab..ffc79c08f94115e10ab4425b372049d4c0e13c96 100755
--- a/pyfstat.py
+++ b/pyfstat.py
@@ -1404,6 +1404,9 @@ class MCMCSearch(BaseSearchClass):
 
         if subtractions is None:
             subtractions = [0 for i in range(ndim)]
+        else:
+            if len(subtractions) != self.ndim:
+                raise ValueError('subtractions must be of length ndim')
 
         with plt.style.context((context)):
             if fig is None and axes is None: