Forgot to set self.metric. It works now.