Fixed Download button not functioning correctly