Fix square_improvement logic again.