fix return type of virtual function