fixed upload script