Update to keep the order of records in order to make sure the hash id wi...

...ll not be changed by random order of records