Fixed records comparison.
Updated tests.