diff --git a/flatland/envs/rail_env.py b/flatland/envs/rail_env.py
index 848ac15aab5f9b0c933751da8f278633bb1077b8..566fa7d1b4c9da73e936a1b4aa7be3d3d066db42 100644
--- a/flatland/envs/rail_env.py
+++ b/flatland/envs/rail_env.py
@@ -337,11 +337,11 @@ class RailEnv(Environment):
 
             # The train is broken
             if agent.malfunction_data['malfunction'] > 0:
+
                 # Last step of malfunction --> Agent starts moving again after getting fixed
                 if agent.malfunction_data['malfunction'] < 2:
                     agent.malfunction_data['malfunction'] -= 1
                     self.agents[i_agent].moving = True
-                    action_dict[i_agent] = RailEnvActions.DO_NOTHING
 
                 else:
                     agent.malfunction_data['malfunction'] -= 1
@@ -349,7 +349,6 @@ class RailEnv(Environment):
                     # Broken agents are stopped
                     self.rewards_dict[i_agent] += step_penalty * agent.speed_data['speed']
                     self.agents[i_agent].moving = False
-                    action_dict[i_agent] = RailEnvActions.DO_NOTHING
 
                     # Nothing left to do with broken agent
                     continue