derived class bug fix