remove excess closing bracket