Fixed write_metadata/create_metadata methods
v2.20.3.1