Add exit button to dialogues