Why my state won't turn ref