state stack fix