fix setting metadata