fix crash in download file