fix pure virtual function call crash