fixed stateStack