Added an option to dynamically disable the next step