Fixed errors thrown in docx and pptx downloads