Handle metadata properly