Fix for "line 318: [: too many arguments" error