Fixed a cash caused by records with null metadata.