adding the close button for the preview dialog.