Update state_manager.cpp