When an error occured in some functions (richtext afterrender for example) the error dialog is broken