Add check for unmatched bracket