Added a strtolower to make the has_metadata check, case insensitive.