Fixing some failed uses of preview or view document API.