clear up the code, avoid to show up the dialog when actions successfully preformed