Track record handling fixes and tests added.