fixed get_state