fix pdf attachment being downloaded as text