Fix error when download-button is clicked with no certificate selected