fix bug in sexp jar, auto close brackets on error