Fixes https://github.com/agentgateway/agentgateway/issues/985 This fixes a few bugs that were caused by the lack of these