added onCloseButton to Dialog