You can remove this, I implemented it generically in the dialog class.