update index for exit button