If you've been rewriting code, then it seems pretty likely there's a bug hiding somewhere. Try a debugger, or possibly SnoopDos (enable all functions) to see where things are going wrong.
If it is a stack issue, be sure to press Enter after increasing the stack value - sometimes the string gadgets get dumb and only actually change if you do that.