Updated enterState() logic