fixed state filter bug