Added features to pick up elements that come in to existence after the next button has been clicked