I tried it and it worked fine.
Try and paste the script into a new file and see if that works are type /remote on and retry.