The use of the Wigner function for the study of quantum transport in open systems is subject to severe criticisms. Some of the problems arise from the assumption of infinite coherence length of the electron dynamics outside the system of interest. In the present work the theory of the Wigner function is revised assuming a finite coherence length. A new dynamical equation is found, corresponding to move the Wigner momentum off the real axis, and a numerical analysis is performed for the case of study of the one-dimensional potential barrier. In quantum device simulations, for a sufficiently long coherence length, the new formulation does not modify the physics in any finite region of interest but it prevents mathematical divergence problems.