Fixed a discontinuity issue