fix pdf download issue