Updated correction script and macro:

I did some small changes to create results that I can compare with the
Java implementation of the correction.