fixed bug with exit button