fix error when file attach.