protect against endTokens not being found