If they weren't tight against the flange then you either cross threaded, got caught up on shiz on the nut from not cleaning them, or as you said not a flat surface. Clean all nut/bolt threads before re-using them (or get new ones).
To torque them you should take the assembly out and work on a bench. With the right tools and space you can torque them. The plates just bend to allow you to tighten the nuts...then bend the plates back, or get new ones.
Best way is to assemble the whole turbo/manifold/elbow/oil & water lines assembly outside of the car. Make sure the manifold surface is flat (get skimmed) and use a propper multi layer steel gasket as torqueing the manifold is difficult in situe. But these have less of a chance of blowing if the surfaces are flat, the right gasket is used and you tighten as much as possible (bolts are easier to get to in situe than any others on the whole assembly).
The above method might be the more difficult/time consuming to fit but from personal experience, I'd rather have a tough time fitting the assembly properly that re-doing it again and again.
If you don't do the job properly, you will just carry on battling with gaskets...Do it right, do it once.
I also can't say it enough, Nissan gaskets are the best. Don't use gaskets "like" nissan ones...use the proper Nissan ones.