Fixes on upload script