Fix dialog close promise propagation