fixed some compatibility issues in Upload