Add buffer size fix to makeEndpoint