patch to fix upload endless loop