bugged midpoint