wait(1);
That is the code. even at the beginning of the function and have the function end via return immediately afterwards it would crash. It's important to note I have used that code for over a year until it just decided to crash this time when I would try to publish.
Other situations I would have to add random meaninless functions in certain scripts to get it to publish right.
And again, this all works perfectly from Sed and I just checked to see if Wed was any different and it's not.