Fixed pdf download issue