In reply to Endareth.

You're absolutely right, I left that part in.
I've now corrected the whole script, I'd suggest you copy/paste it again.