This line caused all of my problems. Appearently it is faulty, and it caused the code to stop there, without doing anything after it. I gave the trigger the name itself as a parameter instead of the source, and now it works. Thanks for everything.