fix dialog close function call