fixing next button display issue