Fixing a bug that was preventing download from finishing correctly.