Fix for issue 778 download button appearing where no data is available

Download button will now only be created when data is available