Fix random crashes on the old execute function.

Unit tests are a good thing :)