Make next button work