Updating script to v10.5

- Double "${" error on line 1640 fixed