Fixed instances where mismatched braces causes browser to crash