todo bug changeState