display error when preview.