Fixed that the dialog does not show messages when using in a Fragment.