fix file downloading