fix  stack bug