The following infinitesimal transformation of phase space coordinates (for infinitesimal $\epsilon$) is apparently canonical (preserving Hamilton's equations and Poisson brackets):
$$ q_i' = q_i + \epsilon \frac{\partial g}{\partial p_i} $$
$$ p_i' = p_i - \epsilon \frac{\partial g}{\partial q_i} $$
where $g$ is the generator and a function of $q$ and $p$.
When computing the conditions for being canonical in terms of Poisson Brackets $\{q_i', q_j'\} = 0$, $\{p_i', p_j'\} = 0$, $\{q_i', p_j'\} = \delta_{ij}$. There seems to be second-order partial derivative terms that don't cancel. For example,
$$\{q_i', q_j'\} = \Sigma_k (\frac{\partial q_i'}{\partial q_k} \frac{\partial q_j'}{\partial p_k} - \frac{\partial q_i'}{\partial p_k} \frac{\partial q_j'}{\partial q_k}) = [(1 + \epsilon \frac{\partial ^2 g}{\partial q_i \partial p_i})(\epsilon \frac{\partial ^2 g}{\partial p_i \partial p_j}) - (\epsilon \frac{\partial ^2 g}{(\partial p_i)^2})(\epsilon \frac{\partial ^2 g}{\partial q_i \partial p_j})] + [(\epsilon \frac{\partial ^2 g}{\partial p_i \partial q_j}) (\epsilon \frac{\partial ^2 g}{(\partial p_j)^2}) - (\epsilon \frac{\partial ^2 g}{\partial p_j \partial p_i})(1 + \epsilon \frac{\partial ^2 g}{\partial q_j \partial p_j})] + \Sigma_{k \neq i,j} (\frac{\partial q_i'}{\partial q_k} \frac{\partial q_j'}{\partial p_k} - \frac{\partial q_i'}{\partial p_k} \frac{\partial q_j'}{\partial q_k}).$$
It doesn't look like these first sets of terms for $i$ and $j$ cancel and neither do the sum of the terms not with respect to $i$, or $j$. I see a similar issue with the other Poisson Brackets. Are these second-order partial derivatives all 0? I'm not sure what I am missing. If possible, any hints would be appreciated.