Fix infinite download bug.