fixed bug with metadata