Improve received metadata handling