Fix a bug with the dialog preview