Revert "Small optimisation in setRestricted & fixed addstring.sh"

This reverts commit 614f7a55ed841f5bad54278e0c9da289f765b5d1.