Added dialog to finished event