Fixed a stack bug