Need to dismiss the dialog before finishing oops