fixed constructor call to virtual function