Incorrect metadata handling

this is the same issue as I reported here