Refactored doStep()
Interupt when RM is TERMINATED.