Also change a very ugly hack in GetDialogStatus. Ew. (cherry picked from commit eacfa9d89afcfad0cbd0715c8a84890c3ccd1c74)