Fix document processing
Save preview type