Fix some warnings (-Woverloaded-virtual).