fix incorrect delete behavior in cases of sequences of ( and )s