Fixed protocol bug where upload length was too long.