bug fix with next button