Added proper handling of error in anonymous record.