Thanks a lot!
I also had made another mistake: I put the variables below all the resources instead of above them.
Now it is working as intended.