Made additional modifications to improve congruence.