Made the metadata argument in update_metadata optional