Flows in closed channels, such as rain storm sewers, often contain transitions from free surface flows to pressurized flows, or viceversa. These phenomena usually require two different sets of equations to model the two different flow regimes. Actually, a few specifications for the geometry of the channel and for the discretization choices can be sufficient to model closed channel flows using only the open channel flow equations. Transitions can also occur in open channels, like those from super- to subcritical flow, or vice versa. These particular flows are usually difficult to reproduce numerically and strong restrictions are imposed on the numerical scheme to simulate them. In this paper, an implicit finite-difference conservative algorithm is proposed to deal properly with these problems. In addition, a special flux limiter is described and implemented to allow accurate flow simulations near hydraulic structures such as weirs. A few computational examples are given to illustrate the properties of the scheme and the numerical solutions are compared with experimental data, when possible