fix expandBrackets()