minor changes in metadata handling