Corrected Midpoint code

line 278, 289 are now /2 instead of /6