Renamed _get_metadata to _reset_metadata
Handled case where metadata doesn't exist in _reset_metadata