- fixed a bug where old buttons were not being removed before new buttons are appended to the document