In long Josephson junctions the motion of fluxons is revealed by the existence of current steps, zero-field steps, in the current-voltage characteristics. In this paper we investigate the stability of the fluxon motion when high values of the current bias are involved. The investigation is carried on by numerical integration of the model equation, the perturbed sine-Gordon equation, simulating junctions of overlap and annular geometry. A detailed description of the mechanism for the switching from the top of the zero-field step for both geometries is reported. Moreover, the effect of the various dissipations and of the junction length on the switching-current value is investigated. A simple boundary model is able to describe, for junctions of overlap geometry, the qualitative dependence of the switching current on the system parameters.