fixed bug in parsing expressions with brackets