fix the preview problem