fix null of metadata