Corrected error in get_state.