Updated, added support for currently showing dialog