The script looks fine(ish) apart from the that one SET node. This is a very common thing to do:
Try it like so.