Added proper handling of model error in anonymous record.