fixed state bug

not happy with solution