fixed bug in updata metadata