In the numerical solution of Maxwell's equations, tangential continuity of field components across a material interface is usually enforced by the numerical method, while the normal continuity of fluxes is not constrained. This is acceptable in the simulation of a pure electromagnetic (EM) problem. In a self-consistent simulation of the wave-particle interaction, however, the normal components are as important as the tangential components. In this paper, the normal continuity is taken into consideration by introducing a hyperbolic divergence cleaning technique into Maxwell's equations in inhomogeneous media. It is shown in the numerical example that by suppressing the numerical error related to Gauss's laws, the tangential continuity of the fields and the normal continuity of the fluxes can all be preserved across the interface of two different media.