fixed bug in metadata handling