Important bugfix to avoid infinite loop at download;