fix next button bug