Using set_deffered() has been bricking my computer, any suggestions?

Please paste the whole script.
Also see Posting guidelines in #Help channel, where you will find instruction how to properly format your code snippets.