Simplified next step algorithm (bugged).
Fixed bug by running step definition inside the promise chain.