Added exit mode to dialog