Add missing '!'.
Remove a few "Invalid write of size 8" errors.

Don't set all the pointers to stacks to NULL.