Fixed minor bug when handling } and )