Fix implementation of virtual function.