Fix bracket creation SQL errors.