An improved transfer matrix method is developed with modular matrices for rectangular electric and magnetic vector potentials, as well as the 3-function like potentials. As an example, the spin-dependent conductance in two-dimensional electron gas under modulation of two magnetic barriers are recalculated and compared with those illustrated in (Wang et al. Chin. Phys. B 19, 037301(2010)). The previous results are found inaccurate, their transfer matrix was derived for slowly varying magnetic vector potential, which is inappropriate for 3-function like Zeeman interaction potentials. Furthermore, the last transfer matrix of eq. (4) is also found incorrect, and the Zeeman interaction is wrongly expressed and mistakenly enhanced about (1/0.067 approximate to 15) times. Our improved method here is general and is demonstrated very fast forevaluating various spin-dependent transport properties in complex hybrid magnetic-electric structures.