Fixed upload script