Minor function fix to download pdf button