Fixed another bug in the Dialog and DialogPanel class.