Fix states not triggering properly