Fix matching brackets problem