Fixed bug in BatchGD (didn't output result in last contract for next iterations)