avoid deprecation and ensure dialog close event is passed to client