Merge "Close the dialog activity before new one is displayed"