Properly implement relation match task.