More values are now used when calculating last_thickness to avoid mode jumps