Fixed an off by one error that could cause segfault in pinecone if output length was shorter than input length.