That was bound to happen! To keep things reasonably straight, you need to fixture the rails on a welding table or make sure you weld top & bottom alternately, one picket at a time. Doing both is best. Since you used flat on the bottom and tube on the top, even those precautions aren't going to be perfect. If you welded all the pickets to either top or bottom at once, and have already added the other rail, it may be impossible to straighten. If you'll paint the railing you can heat the top rail directly over each picket to a medium red heat with an oxy-acetylene torch, and let cool. Use a welding tip and heat a pattern roughly the same as the weld where the picket is. At first it will bow the wrong way, but cooling will pull things back toward straight. (This assumes that the railing is crowned (convex) on the top.