The advice provided above gives you some good techniques to ensure the elements being riveted together do not separate however as you might have guessed, the original problem is the fact the materials are not clamped together well enough to start with. This could be due to a number of reasons:
1. because you have not used enough clecos in the adjacent holes
2. burrs or pieces of metal are sitting between the parts preventing then from mating correctly
3. The holes are undersize and the rivets are pushing the material apart when you push the rivet into place before setting.
There are other reasons as well that others might like to offer, but these are the most common mistakes I see. Before riveting make sure your edges are deburred, including not only the edges of the material but also the holes you're about to rivet. After setting things up in a preliminary state to confirm alignment I will always pull the structure apart again and make sure all surfaces are clean (primed if required) and no contamination is present between the layers. Good clamping helps - use skin pins instead of cleocs where necessary. Not all clecos have the same clamping force. Finally - if the hole is tight and you have to tap the rivet into position, use a "draw" to bring the skins together before setting the rivet. If you're not familiar with the terminology - this is where you place the dolly flat beside the rivet to be set and you use the rivet gun to tap the manufactured head of the rivet, "drawing" the material together. Do not remove the rivet gun at this point, then set. I know you indicated you were using a pneumatic gun so you can't really use this method, but it might be a good time to move to a 3x if you're having issues.
Hope that helps.