final fixes for download handling