Bug fix in loop uploads.