Fix bug in base class