fix unterminated ${VAR} curly brackets