Prevent sudden path reversal

Due to rounding error