fix virtual functions in State class