tweaked new correction code