Update to keep the order of records in order to make sure the hash id will not be changed by random order of records