Fix issue when using NPN protocol negotiation