fix bug opening docx and pdf file