fix overshoot handling; make prediction configurable