delete extra close brackets