Bugfix in metadata
Updated metadata handling