Fixed classical "not enough parentheses" bug