fixed download func