added explicit sanitization for metadata