Recent high power tests of x-band accelerating structures at SLAC have shown that their performance is limited by breakdowns in couplers. The behavior of these breakdowns is consistent with a model of pulsed heating due to high magnetic fields. The observed damage is located in the region of high magnetic fields. To calculate these magnetic fields, 3D electrodynamics models of the couplers were built and matched. Coupler models were matched with an automated procedure that uses the commercial code HFSS. This matching procedure is based on calculation of reflection from the coupler cell using the electric field distribution on the axis of the structure. After matching, the magnetic and electric fields in the couplers were calculated for typical operation parameters. Highest magnetic fields on the order of 1 MA/m were found on sharp ( 80 micron radius) edges of the waveguide-to-coupler-cell irises. For some input couplers, electric fields on these edges are found be as high as 10 MV/m. To reduce the high magnetic fields new couplers were designed. These couplers have 3 mm radius waveguide-to-coupler-cell iris and maximum magnetic field below 0.5 MA/m for 70 MV/m average accelerating gradient. The matching procedures, and typical results for couplers with sharp and rounded irises are discussed in this paper as well as possible causes of breakdowns in the couplers.