Only delete the old bracket after the new one is generated

to prevent it from "flashing"