Fix virtual function resolution issue