fix get state bug