fixed checkIfUploadFinished bug