fixed default state bug