Quit when loading dialog closed