diff --git a/transition_machine/src/ActionBank.cpp b/transition_machine/src/ActionBank.cpp
index 81cf71e09a4c8d8b6d5f51a1cf6b72b1fe937ee0..4f56170526f7a706f1b4a8c6bf47f8c61e0d53b4 100644
--- a/transition_machine/src/ActionBank.cpp
+++ b/transition_machine/src/ActionBank.cpp
@@ -1273,10 +1273,10 @@ bool ActionBank::simpleBufferWriteAppliable(Config & config,
 
   int index = config.getHead() + relativeIndex;
 
-  if (!checkEmptyness)
-    return !(index < 0) && index < tape.size();
+  if (!checkEmptyness || index >= tape.size())
+    return !(index < 0);
 
-  return !(index < 0) && index < tape.size() && tape.getHyp(relativeIndex).empty();
+  return !(index < 0) && tape.getHyp(relativeIndex).empty();
 }
 
 bool ActionBank::isRuleAppliable(Config & config,