Fix errors in stack.c