Corrected StackError bug