Fix EndTransfer error not correctly set for size or hash error