Small optimisation in setRestricted & fixed addstring.sh