fix typo in base class

it should be "self._name" instead of "self.name"