exit button bug fix