I'm trying to use the replica trick ($Z\rightarrow Z^{n})$ to evaluate a particular partition function (over an $N\times N$ matrix), and I've hastily assumed that I can commute the limits of $N\rightarrow \infty$ and $n\rightarrow 0$, but upon further reflection I realize this may not be true. What conditions must be satisfied for these limits to be interchangeable?