dialog close bugfix